package Help.For.You.Other;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;


public class EventHandlerInterceptor implements HandlerInterceptor{

	private Logger logger=Logger.getLogger(this.getClass());
	/*
	 * 컨트롤러 요청 처리후
	 */
	@Override
	public void afterCompletion(HttpServletRequest arg0,
			HttpServletResponse arg1, Object arg2, Exception arg3)
			throws Exception {
		logger.info("afterCompletion");
		
	}

	/*
	 *컨트롤러 요청 도중
	 */
	@Override
	public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
			Object arg2, ModelAndView arg3) throws Exception {
		// TODO Auto-generated method stub
		logger.info("postHandle");
		
	}
	
	/*
	 * 컨트롤러 요청 처리전
	 */
	@Override
	public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1,
			Object arg2) throws Exception {
		// TODO Auto-generated method stub
		logger.info("preHandle");
		return true;
	}

}
